<template>
  <div class="app-container no-pagination">
    <el-tabs v-model="tabActiveName" type="card">
      <el-tab-pane label="启用参数" name="first">
        <div class="filter-container">
          <div class="right-block">
            <el-button type="primary" size="small" @click="saveParamForm">保存</el-button>
          </div>
        </div>
        <el-card class="box-card">
          <el-form ref="paramForm" :model="paramForm" class="paramForm" auto-complete="off" label-position="right" label-width="100px">
            <h3 class="theme-title">基础参数</h3>
            <el-form-item prop="username" label="账本名称">
              <el-input
                v-model="paramForm.username"
                size="small"
              />
            </el-form-item>
            <el-form-item prop="username" label="账本类型">
              <el-select v-model="paramForm.region" size="small" class="theme-select" placeholder="请选择账本类型">
                <el-option v-for="(item, index) in $ACCOUNT_TYPE_LIST" :key="index" :label="item.label" :value="item.value"/>
              </el-select>
            </el-form-item>
            <el-form-item prop="username" label="会计制度">
              <el-input
                v-model="paramForm.username"
                size="small"
              />
              <el-checkbox v-model="radio">启用新政府会计制度</el-checkbox>
            </el-form-item>
            <h3 class="theme-title">业务参数</h3>
            <el-form-item prop="username" label="科目次级">
              <el-input
                v-model="paramForm.username"
                size="small"
              />
            </el-form-item>
            <el-form-item prop="username" label="编码长度">
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
            </el-form-item>
            <el-form-item prop="username" label="凭证号长度">
              <el-input
                v-model="paramForm.username"
                size="small"
              />
            </el-form-item>
          </el-form>
        </el-card>
      </el-tab-pane>
      <el-tab-pane label="财务处理" name="second">
        <div class="filter-container">
          <div class="right-block">
            <el-button type="primary" size="small" @click="saveParamForm">保存</el-button>
          </div>
        </div>
        <el-card class="box-card">
          <el-form ref="financeForm" :model="financeForm" class="financeForm" auto-complete="off" label-position="right" label-width="100px">
            <h3 class="theme-title">小数位数控制</h3>
            <div class="form-content">
              <span>数量小数位数</span>
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
              <span>单价小数位数</span>
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
              <span>本币小数位数</span>
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
              <span>外币小数位数</span>
              <el-input
                v-model="paramForm.username"
                size="small"
                class="input-s"
              />
            </div>
            <h3 class="theme-title">凭证处理方式</h3>
            <div class="form-content">
              <el-radio v-model="radio" label="1">制单人和审核人可以为同一人</el-radio>
              <el-radio v-model="radio" label="2">只能由制单人本人修改凭证</el-radio>
            </div>
            <h3 class="theme-title">凭证默认日期</h3>
            <div class="form-content">
              <el-radio v-model="radio" label="1">上一张凭证日期</el-radio>
              <el-radio v-model="radio" label="2">当天</el-radio>
            </div>
            <h3 class="theme-title">凭证默认角色设置</h3>
            <h3 class="theme-title">月结控制</h3>
            <div class="form-content">
              <el-radio v-model="radio" label="1">上一张凭证日期</el-radio>
              <el-radio v-model="radio" label="2">当天</el-radio>
            </div>
            <h3 class="theme-title">年结控制</h3>
            <div class="form-content">
              <span class="content-label">收入支出科目有余额</span>
              <el-radio v-model="radio" label="1">禁止</el-radio>
              <el-radio v-model="radio" label="2">提示</el-radio>
              <el-radio v-model="radio" label="2">不控制</el-radio>
            </div>
          </el-form>
        </el-card>
      </el-tab-pane>
      <el-tab-pane label="打印设置" name="third">
        <div class="filter-container">
          <div class="right-block">
            <el-button type="primary" size="small" @click="savePrintConfig">保存</el-button>
          </div>
        </div>
        <el-card class="box-card">
          <h3 class="theme-title">凭证打印设置</h3>
          <div class="check-wrap">
            <el-checkbox-group v-model="printConfig">
              <div class="check-item"><el-checkbox label="相同科目合并打印"/></div>
              <div class="check-item"><el-checkbox label="打印辅助核算项"/></div>
              <div class="check-item"><el-checkbox label="打印数量单价"/></div>
              <div class="check-item"><el-checkbox label="打印外币汇率"/></div>
              <div class="check-item"><el-checkbox label="不打印科目代码"/></div>
            </el-checkbox-group>
          </div>
        </el-card>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>

export default {
  name: 'SysParam',
  data() {
    return {
      tabActiveName: 'first',
      printConfig: [],
      paramForm: {},
      radio: '1'
    }
  },
  computed: {
  },
  created() {
  },
  methods: {
    savePrintConfig() {
      console.log(this.printConfig)
    },
    saveParamForm() {

    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .paramForm {
    width: 460px;
  }
  .input-s {
    width: 80px;
    margin-right: 9px;
    &:last-child{
      margin-right: 0;
    }
  }
  .box-card {
    min-height: calc(100vh - 250px);;
  }
  .form-content {
    padding-left: 15px;
    .content-label {
      margin-right: 15px;
    }
  }
</style>
